package com.fishery.authority.client;

import com.fishery.authority.entity.vo.CreateBaseVo;
import com.fishery.authority.handler.BaseClientFallback;
import com.fishery.entity.Result;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author 白sa能
 * @className
 * @date Created in 8:38 AM 1/31/21
 * @package com.fishery.authority.client
 * @Description
 */
@FeignClient(value = "fishery-base-service", fallback = BaseClientFallback.class)
public interface BaseClient {

    @RequestMapping(value = "/base/{baseId}",method = RequestMethod.GET)
    public Result getBaseInfo(@PathVariable("baseId") String baseId);

    @RequestMapping(value = "/base/{baseId}",method = RequestMethod.DELETE)
    public Result delBase(@PathVariable("baseId") String baseId);

    @RequestMapping(value = "/base/create",method = RequestMethod.POST)
    public Result createBase(@RequestBody @ApiParam(required = true, value = "base对象") CreateBaseVo vo);
}
